import { http } from '@/utils/request'
import type { Badge, UserBadge, ApiResponse } from '@/types'

// 获取用户徽章
export const getUserBadges = (): Promise<ApiResponse<UserBadge[]>> => {
  return http.get('/client/users/badges')
}

// 获取所有徽章
export const getAllBadges = (): Promise<ApiResponse<Badge[]>> => {
  return http.get('/client/badges')
}

// 获取徽章详情
export const getBadgeDetail = (id: number): Promise<ApiResponse<Badge>> => {
  return http.get(`/client/badges/${id}`)
} 